namespace Ex
{
    using System.Collections;

    /// <summary>
    /// 从C#端产生，传向lua的值，不可从lua端修改
    /// </summary>
    public class ExCsTable : ExTable, IExCsElement
    {
        public ExCsTable(EnvLua lua, IDictionary? table = null) : base(lua, table)
        {
        }

        /// <summary>
        /// 表的复制
        /// </summary>
        /// <param name="table"></param>
        public ExCsTable(ExTable table) : base(table) {}


        public static ExCsTable RefTableToValueTable(ExRefTable refTable)
        {
            return new ExCsTable(refTable.CurrentLua, Tool.IExTableToDictionary(refTable));
        }

    }
}